package com.kancy.vip.pattern.adapter.v1;

/**
 * @author kancy
 * @date 2019/3/17 16:44
 */
public class DC5VAdapter implements DC5V {

	private DC220V dc220V;

	public DC5VAdapter(DC220V dc220V) {
		this.dc220V = dc220V;
	}

	@Override
	public int output() {
		int output = dc220V.output();

		// 进行转换适配
		output = output / 44;
		System.out.println("适配器输出电压：" + output + "V");
		return output;
	}
}
